<template>
  <div>
    <h2>home</h2>
    <button @click="addNum">+</button>
     {{ $store.state.num }}
     <button @click="reduceNum">-</button>
  </div>
</template>

<script>
export default {
  methods: {
    addNum () {
      this.$store.commit('add_num', 5)
    },
    reduceNum () {
      this.$store.commit('reduce_num', 10)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
